package org.example.basic.service.impl;


import org.example.basic.service.FourWheelerService;
import org.example.basic.service.VehicleService;

/**
 * @author songyafei
 */
public class CarServiceImpl implements VehicleService, FourWheelerService {
    //指定父类方法
    @Override
    public void print() {
        VehicleService.super.print();
        VehicleService.blowHorn();
    }


    //自己实现默认方法
//    default void print(){
//        System.out.println("我是一辆四轮汽车!");
//    }


    public static void main(String[] args) {
        CarServiceImpl carService = new CarServiceImpl();
        carService.print();
    }
}
